package com.demo.project_template.controller;

import com.demo.project_template.entity.UserLike;
import com.demo.project_template.service.UserLikeService;
import com.demo.project_template.vo.response.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 用户喜欢用户记录 前端控制器
 * </p>
 *
 * @author 杨玉龙
 * @since 2024-08-20 11:48:58
 */
@Api(tags = "用户喜欢记录")
@RestController
@RequestMapping("/userLike")
public class UserLikeController {

    @Resource
    private UserLikeService userLikeService;


    @ApiOperation(value = "点赞")
    @PostMapping(value = "/add")
    public R<?> add(@RequestBody UserLike userLike){
        userLikeService.add(userLike);
        return R.success();
    }
}
